package com.situ.skymallproductcategoryapi.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.situ.model.ProductCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductCategoryMapper extends BaseMapper<ProductCategory> {
    default Page<ProductCategory> getList(Page<ProductCategory> page, ProductCategory productCategory) {
        QueryWrapper<ProductCategory> qw = new QueryWrapper<>(productCategory);
        return selectPage(page, qw);
    }

    /**
     * 更新显示状态
     * @param id
     * @param isShow
     * @return 影响行数
     */
    int updateShow(Integer id, @Param("status") Integer isShow);
}
